﻿<html>
  <head>
    <meta name="generator"
    content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="generator" content="Aspose.Words for .NET 15.1.0.0" />
    <title>常用的设计模式</title>
  </head>
  <body>
    <div>
	<p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
	<a href="/test/index.html"; style="font-family:宋体; font-size:12pt">返回</a>
	</p>
      <p style="line-height:22pt; margin:0pt; orphans:0; text-align:center; widows:0">
        <span style="font-family:宋体; font-size:22pt; font-weight:bold">设计模式</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
      <span style="font-family:宋体; font-size:16pt; font-weight:bold">一</span> 
      <span style="font-family:宋体; font-size:16pt; font-weight:bold">.</span> 
      <span style="font-family:宋体; font-size:16pt; font-weight:bold">设计模式</span> 
      <span style="font-family:宋体; font-size:16pt; font-weight:bold">之六大原则</span></p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">1.</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">单一职责原则</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">概念</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
        <span style="font-family:宋体; font-size:12pt">就一个类而言，应该仅有一个引起它变化的原因。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">比如：</span>
        <span style="font-family:宋体; font-size:12pt">一个房子有客厅，有厨房，有卫生间，有卧室</span>
        <span style="font-family:宋体; font-size:12pt">，</span>
        <span style="font-family:宋体; font-size:12pt">每个房间都有自己</span>
        <span style="font-family:宋体; font-size:12pt">“单一</span>
        <span style="font-family:宋体; font-size:12pt">的职责/</span>
        <span style="font-family:宋体; font-size:12pt">用途”。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">2.</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">开放封闭</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">原则</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">概念</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
        <span style="font-family:宋体; font-size:12pt">软件实体（</span>
        <span style="font-family:宋体; font-size:12pt">类</span>
        <span style="font-family:宋体; font-size:12pt">，方法，模块）</span>
        <span style="font-family:宋体; font-size:12pt">应该可以</span>
        <span style="font-family:宋体; font-size:12pt">扩展，但是不可以修改。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">比如</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
        <span style="font-family:宋体; font-size:12pt">整个</span>
        <span style="font-family:宋体; font-size:12pt">笔记本电脑是封闭的，笔记本提供了若干个</span>
        <span style="font-family:宋体; font-size:12pt">USB插口是</span>
        <span style="font-family:宋体; font-size:12pt">开放扩展的。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">3.</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">依赖倒置原则</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">概念</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
        <span style="font-family:宋体; font-size:12pt">针对抽象</span>
        <span style="font-family:宋体; font-size:12pt">编程</span>
        <span style="font-family:宋体; font-size:12pt">，不要针对实现编程</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">比如：一个</span>
        <span style="font-family:宋体; font-size:12pt">中国人和一个美国人上网，搜索、</span>
        <span style="font-family:宋体; font-size:12pt">聊天</span>
        <span style="font-family:宋体; font-size:12pt">、看视频，但是他们上网方式不同，需要抽象出上网方式</span>
        <span style="font-family:宋体; font-size:12pt">。中国人</span>
        <span style="font-family:宋体; font-size:12pt">上网用百度，聊天用微信</span>
        <span style="font-family:宋体; font-size:12pt">/QQ，</span>
        <span style="font-family:宋体; font-size:12pt">看视频用腾讯</span>
        <span style="font-family:宋体; font-size:12pt">/爱奇艺</span>
        <span style="font-family:宋体; font-size:12pt">；</span>
        <span style="font-family:宋体; font-size:12pt">美国人</span>
        <span style="font-family:宋体; font-size:12pt">上网用</span>
        <span style="font-family:宋体; font-size:12pt">G</span>
        <span style="font-family:宋体; font-size:12pt">oogle，</span>
        <span style="font-family:宋体; font-size:12pt">聊天</span>
        <span style="font-family:宋体; font-size:12pt">用</span>
        <span style="font-family:宋体; font-size:12pt">MSN，</span>
        <span style="font-family:宋体; font-size:12pt">看视频用</span>
        <span style="font-family:宋体; font-size:12pt">Y</span>
        <span style="font-family:宋体; font-size:12pt">outube</span>
        <span style="font-family:宋体; font-size:12pt">。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">4.</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">里氏</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">转换原则</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">概念</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
        <span style="font-family:宋体; font-size:12pt">子类</span>
        <span style="font-family:宋体; font-size:12pt">型必须能够替换掉他们的父类型</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">比如：Unity引擎</span>
        <span style="font-family:宋体; font-size:12pt">是一个父类，</span>
        <span style="font-family:宋体; font-size:12pt">U</span>
        <span style="font-family:宋体; font-size:12pt">nity4.x</span>
        <span style="font-family:宋体; font-size:12pt">，Unity5.x，Unity2017.x都是</span>
        <span style="font-family:宋体; font-size:12pt">这个</span>
        <span style="font-family:宋体; font-size:12pt">父类</span>
        <span style="font-family:宋体; font-size:12pt">下的子类，本身具备父类的功能，同时又有自己</span>
        <span style="font-family:宋体; font-size:12pt">的</span>
        <span style="font-family:宋体; font-size:12pt">新功能。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">5.</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">迪米特原则</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">概念</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
        <span style="font-family:宋体; font-size:12pt">一个对象</span>
        <span style="font-family:宋体; font-size:12pt">应当</span>
        <span style="font-family:宋体; font-size:12pt">对其他对象有尽可能少的了解，不和陌生人说话</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">比如</span>
        <span style="font-family:宋体; font-size:12pt">：公司开会只需要董事长助理</span>
        <span style="font-family:宋体; font-size:12pt">通知其他人</span>
        <span style="font-family:宋体; font-size:12pt">就行</span>
        <span style="font-family:宋体; font-size:12pt">，</span>
        <span style="font-family:宋体; font-size:12pt">这降低了董事长</span>
        <span style="font-family:宋体; font-size:12pt">和</span>
        <span style="font-family:宋体; font-size:12pt">公司员工的耦合度，提高董事长的时间价值和效率。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">6.</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">接口</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">隔离原则</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">概念</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
        <span style="font-family:宋体; font-size:12pt">一个类</span>
        <span style="font-family:宋体; font-size:12pt">对另一个</span>
        <span style="font-family:宋体; font-size:12pt">类</span>
        <span style="font-family:宋体; font-size:12pt">的</span>
        <span style="font-family:宋体; font-size:12pt">依赖</span>
        <span style="font-family:宋体; font-size:12pt">应该建立在最小的接口上</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">比如</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
        <span style="font-family:宋体; font-size:12pt">网上</span>
        <span style="font-family:宋体; font-size:12pt">公司</span>
        <span style="font-family:宋体; font-size:12pt">多</span>
        <span style="font-family:宋体; font-size:12pt">部门</span>
        <span style="font-family:宋体; font-size:12pt">工作封装</span>
        <span style="font-family:宋体; font-size:12pt">统一接口不具有代表性，完全看不出来功能隔离，员工基本全能。</span>
        <span style="font-family:宋体; font-size:12pt">另外</span>
        <span style="font-family:宋体; font-size:12pt">一个是系统权限，</span>
        <span style="font-family:宋体; font-size:12pt">对</span>
        <span style="font-family:宋体; font-size:12pt">不同用户</span>
        <span style="font-family:宋体; font-size:12pt">屏蔽</span>
        <span style="font-family:宋体; font-size:12pt">不</span>
        <span style="font-family:宋体; font-size:12pt">需要</span>
        <span style="font-family:宋体; font-size:12pt">的方法，达成接口隔离。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:16pt; font-weight:bold">二</span>
        <span style="font-family:宋体; font-size:16pt; font-weight:bold">.</span>
        <span style="font-family:宋体; font-size:16pt; font-weight:bold">常用</span>
        <span style="font-family:宋体; font-size:16pt; font-weight:bold">的设计模式</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">1</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">.单例模式</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">实现</span>
        <span style="font-family:宋体; font-size:12pt">方式：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">a)</span>
        <span style="font-family:宋体; font-size:12pt">将</span>
        <span style="font-family:宋体; font-size:12pt">被实现的类的构造方法设计成</span>
        <span style="font-family:宋体; font-size:12pt">private的</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">b)添加</span>
        <span style="font-family:宋体; font-size:12pt">此类引用的静态成员变量，并为</span>
        <span style="font-family:宋体; font-size:12pt">其</span>
        <span style="font-family:宋体; font-size:12pt">实例化</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">c)</span>
        <span style="font-family:宋体; font-size:12pt">在</span>
        <span style="font-family:宋体; font-size:12pt">被实现的类中提供公共的</span>
        <span style="font-family:宋体; font-size:12pt">CreateInstance函数</span>
        <span style="font-family:宋体; font-size:12pt">，返回实例化的此类，就是</span>
        <span style="font-family:宋体; font-size:12pt">b</span>
        <span style="font-family:宋体; font-size:12pt">中</span>
        <span style="font-family:宋体; font-size:12pt">的静态成员变量</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">适用</span>
        <span style="font-family:宋体; font-size:12pt">场景：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">1)需要</span>
        <span style="font-family:宋体; font-size:12pt">频繁实例化</span>
        <span style="font-family:宋体; font-size:12pt">然后</span>
        <span style="font-family:宋体; font-size:12pt">销毁的对象</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">2)</span>
        <span style="font-family:宋体; font-size:12pt">创建</span>
        <span style="font-family:宋体; font-size:12pt">对象是</span>
        <span style="font-family:宋体; font-size:12pt">耗时</span>
        <span style="font-family:宋体; font-size:12pt">过多或者耗资源过多，但又经常用到的</span>
        <span style="font-family:宋体; font-size:12pt">对象</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">3)</span>
        <span style="font-family:宋体; font-size:12pt">有状态</span>
        <span style="font-family:宋体; font-size:12pt">的工具类对象</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">4)频繁</span>
        <span style="font-family:宋体; font-size:12pt">访问数据库或文件的对象</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">脚本</span>
        <span style="font-family:宋体; font-size:12pt">案例：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">2</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">.观察者模式</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">实现</span>
        <span style="font-family:宋体; font-size:12pt">方式：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">a)</span>
        <span style="font-family:宋体; font-size:12pt">角色</span>
        <span style="font-family:宋体; font-size:12pt">抽象类（</span>
        <span style="font-family:宋体; font-size:12pt">提供</span>
        <span style="font-family:宋体; font-size:12pt">对观察者的</span>
        <span style="font-family:宋体; font-size:12pt">添加</span>
        <span style="font-family:宋体; font-size:12pt">，删除和通知功能）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">b)角色</span>
        <span style="font-family:宋体; font-size:12pt">具体类，实现</span>
        <span style="font-family:宋体; font-size:12pt">a</span>
        <span style="font-family:宋体; font-size:12pt">，维护</span>
        <span style="font-family:宋体; font-size:12pt">c</span>
        <span style="font-family:宋体; font-size:12pt">的集合（</span>
        <span style="font-family:宋体; font-size:12pt">对</span>
        <span style="font-family:宋体; font-size:12pt">角色抽象类的实现）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">c)观察者</span>
        <span style="font-family:宋体; font-size:12pt">抽象类（</span>
        <span style="font-family:宋体; font-size:12pt">被角色通知</span>
        <span style="font-family:宋体; font-size:12pt">后</span>
        <span style="font-family:宋体; font-size:12pt">实现</span>
        <span style="font-family:宋体; font-size:12pt">的方法）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">d)观察者实现</span>
        <span style="font-family:宋体; font-size:12pt">类，实现</span>
        <span style="font-family:宋体; font-size:12pt">c</span>
        <span style="font-family:宋体; font-size:12pt">（</span>
        <span style="font-family:宋体; font-size:12pt">多个</span>
        <span style="font-family:宋体; font-size:12pt">抽象类）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">适用</span>
        <span style="font-family:宋体; font-size:12pt">环境：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">脚本案例</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">3</span>
        <span style="font-family:宋体; font-size:12pt; font-weight:bold">.装饰模式</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">实现</span>
        <span style="font-family:宋体; font-size:12pt">方式：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">a)抽象</span>
        <span style="font-family:宋体; font-size:12pt">的被装饰角色（</span>
        <span style="font-family:宋体; font-size:12pt">所有</span>
        <span style="font-family:宋体; font-size:12pt">的角色都要直接</span>
        <span style="font-family:宋体; font-size:12pt">或</span>
        <span style="font-family:宋体; font-size:12pt">间接的实现本角色）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">b)具体</span>
        <span style="font-family:宋体; font-size:12pt">的被装饰角色，实现或继承a（</span>
        <span style="font-family:宋体; font-size:12pt">被</span>
        <span style="font-family:宋体; font-size:12pt">功能扩展的角色）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">c)装饰角色，</span>
        <span style="font-family:宋体; font-size:12pt">实现或继承a（</span>
        <span style="font-family:宋体; font-size:12pt">本类</span>
        <span style="font-family:宋体; font-size:12pt">有对a</span>
        <span style="font-family:宋体; font-size:12pt">的</span>
        <span style="font-family:宋体; font-size:12pt">引用，所有的具体装饰角色都</span>
        <span style="font-family:宋体; font-size:12pt">需要</span>
        <span style="font-family:宋体; font-size:12pt">继承这个角色）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">d</span>
        <span style="font-family:宋体; font-size:12pt">)</span>
        <span style="font-family:宋体; font-size:12pt">多个</span>
        <span style="font-family:宋体; font-size:12pt">具体修饰角色，继承</span>
        <span style="font-family:宋体; font-size:12pt">c（对</span>
        <span style="font-family:宋体; font-size:12pt">被装饰角色的功能扩展，可以任意搭配使用）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">适用</span>
        <span style="font-family:宋体; font-size:12pt">环境：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">1)在</span>
        <span style="font-family:宋体; font-size:12pt">不影响其他对象的情况下，以动态、透明的方式给单个对象添加职责</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">2)</span>
        <span style="font-family:宋体; font-size:12pt">处理</span>
        <span style="font-family:宋体; font-size:12pt">那些可以撤销的职责</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">3)</span>
        <span style="font-family:宋体; font-size:12pt">当不能</span>
        <span style="font-family:宋体; font-size:12pt">采用生成子类的方法进行扩充</span>
        <span style="font-family:宋体; font-size:12pt">时</span>
        <span style="font-family:宋体; font-size:12pt">。一种情况</span>
        <span style="font-family:宋体; font-size:12pt">是</span>
        <span style="font-family:宋体; font-size:12pt">，可能有大量独立的扩展，为支持每一种组合将产生大量的子类，使得子类数目呈爆炸性增长。另一</span>
        <span style="font-family:宋体; font-size:12pt">种</span>
        <span style="font-family:宋体; font-size:12pt">情况</span>
        <span style="font-family:宋体; font-size:12pt">可能是因为类定义被隐藏，或类定义不能用于生成子类。</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">脚本案例</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">4</span>
        <span style="font-family:宋体; font-size:12pt">.</span>
        <span style="font-family:宋体; font-size:12pt">简单</span>
        <span style="font-family:宋体; font-size:12pt">工厂模式</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">实现方式</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">a)抽象产品</span>
        <span style="font-family:宋体; font-size:12pt">类（</span>
        <span style="font-family:宋体; font-size:12pt">也可以是</span>
        <span style="font-family:宋体; font-size:12pt">接口）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">b)多个</span>
        <span style="font-family:宋体; font-size:12pt">具体的产品类</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">c)工厂类</span>
        <span style="font-family:宋体; font-size:12pt">（</span>
        <span style="font-family:宋体; font-size:12pt">包括</span>
        <span style="font-family:宋体; font-size:12pt">创建</span>
        <span style="font-family:宋体; font-size:12pt">a的实例</span>
        <span style="font-family:宋体; font-size:12pt">的方法</span>
        <span style="font-family:宋体; font-size:12pt">）</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">适用环境</span>
        <span style="font-family:宋体; font-size:12pt">：</span>
      </p>
      <p style="line-height:22pt; margin:0pt; orphans:0; widows:0">
        <span style="font-family:宋体; font-size:12pt">脚本</span>
        <span style="font-family:宋体; font-size:12pt">案例：</span>
      </p>
    </div>
    <div class="cnzz" style="display: none;">
      <script src="http://s95.cnzz.com/stat.php?id=1253551100&amp;web_id=1253551100" language="JavaScript"></script>
    </div>
    <div class="docpe" style="position: absolute;color: white;margin-left:-450;">
      <a target="_blank" href="http://www.docpe.com">档铺网——在线文档免费处理</a>
    </div>
  </body>
</html>
